<template>
  <demoBlock title="基础用法">
    <vcu-dropdown-menu>
      <vcu-dropdown-item v-model="value1" :options="option1" />
      <vcu-dropdown-item v-model="value2" :options="option2" />
    </vcu-dropdown-menu>
  </demoBlock>
</template>


<script>
import { defineComponent, ref } from "vue";

export default defineComponent({
  setup() {
    const value1 = ref(0);
    const value2 = ref("a");
    const option1 = [
      { text: "全部商品", value: 0 },
      { text: "新款商品", value: 1 },
      { text: "活动商品", value: 2 },
    ];
    const option2 = [
      { text: "默认排序", value: "a" },
      { text: "好评排序", value: "b" },
      { text: "销量排序", value: "c" },
    ];

    return {
      value1,
      value2,
      option1,
      option2,
    };
  },
});
</script>